Allow internal_styles regeneration in out-of-tree builds.
authorrobertl <robertl>
Mon, 6 Oct 2008 16:27:44 +0000 (16:27 +0000)
committerrobertl <robertl>
Mon, 6 Oct 2008 16:27:44 +0000 (16:27 +0000)
Makefile.in
mkstyle.sh

index 31123622fad7e8582bcdbcf4d124257c9b6e9089..eea15c46c1d2ed8def27b9d35a865cd551201455 100644 (file)
@@ -33,7 +33,7 @@ OUTPUT_SWITCH=-o #
 #OPTIMIZATION=-O $(EXTRA_OPTIMIZATION)
 #DEBUGGING=-g $(EXTRA_DEBUGGING)
 # add -DDEBUG_MEM to turn on memory allocation logging
-GBCFLAGS=$(EXTRA_CFLAGS) $(DEBUGGING) -I. \
+GBCFLAGS=$(EXTRA_CFLAGS) $(DEBUGGING) -I@srcdir@ \
        $(OPTIMIZATION) @CFLAGS@
 LDFLAGS=$(EXTRA_LDFLAGS) @LDFLAGS@
 PREFIX=@prefix@
@@ -1028,5 +1028,5 @@ zlib/trees.o: zlib/trees.c zlib/deflate.h zlib/zutil.h zlib/zlib.h \
   zlib/zconf.h zlib/trees.h
 zlib/uncompr.o: zlib/uncompr.c zlib/zlib.h zlib/zconf.h
 zlib/zutil.o: zlib/zutil.c zlib/zutil.h zlib/zlib.h zlib/zconf.h
-internal_styles.c: mkstyle.sh style/*.style
-       ./mkstyle.sh > internal_styles.c || (rm -f internal_styles.c ; exit 1)
+internal_styles.c: mkstyle.sh @srcdir@/style/*.style
+       @srcdir@/mkstyle.sh > internal_styles.c || (rm -f internal_styles.c ; exit 1)
index 19db383a3525d3f37e2dc58adc8d4392fe7f00d0..8e82354d2c809fb02c6e6745932030aac36aea5e 100755 (executable)
@@ -6,7 +6,7 @@ echo
 echo "#include \"defs.h\""
 echo "#if CSVFMTS_ENABLED"
 nstyles="0"
-for i in style/*.style
+for i in `dirname $0`/style/*.style
 do
        A=`basename $i | sed "s/.style$//"`
        [ $A = "README" ] && continue